import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JTabbedPane;
import javax.swing.BoxLayout;
import javax.swing.JButton;
import java.awt.Component;
import java.awt.FlowLayout;
import javax.swing.SwingConstants;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.JTextArea;
import javax.swing.Box;
import java.awt.Panel;
import com.jgoodies.forms.layout.FormLayout;
import com.jgoodies.forms.layout.ColumnSpec;
import com.jgoodies.forms.layout.RowSpec;
import com.jgoodies.forms.factories.FormFactory;
import java.awt.CardLayout;
import java.awt.GridBagLayout;
import java.awt.GridBagConstraints;
import javax.swing.border.TitledBorder;
import javax.swing.border.LineBorder;
import java.awt.Color;


public class Mainframebrah extends JFrame {

	private JPanel contentPane;
	private JTextField ItemIDSaleTxt;
	private JTextField QuantitySaleTxt;
	private JTextField textField;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					Mainframebrah frame = new Mainframebrah();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public Mainframebrah() {
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 450, 350);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(new BoxLayout(contentPane, BoxLayout.X_AXIS));
		
		JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);
		contentPane.add(tabbedPane);
		
		JPanel panel = new JPanel();
		tabbedPane.addTab("Sale", null, panel, null);
		panel.setLayout(new BorderLayout(0, 0));
		
		JPanel panel_4 = new JPanel();
		panel.add(panel_4, BorderLayout.NORTH);
		panel_4.setLayout(new BoxLayout(panel_4, BoxLayout.Y_AXIS));
		
		JPanel panel_5 = new JPanel();
		panel_4.add(panel_5);
		panel_5.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
		
		JLabel ItemIDSale = new JLabel("Item ID:");
		panel_5.add(ItemIDSale);
		
		ItemIDSaleTxt = new JTextField();
		panel_5.add(ItemIDSaleTxt);
		ItemIDSaleTxt.setColumns(10);
		
		JPanel panel_6 = new JPanel();
		panel_4.add(panel_6);
		panel_6.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
		
		JLabel QuantitySale = new JLabel("Quantity:");
		panel_6.add(QuantitySale);
		
		QuantitySaleTxt = new JTextField();
		panel_6.add(QuantitySaleTxt);
		QuantitySaleTxt.setColumns(10);
		
		JPanel panel_7 = new JPanel();
		panel_4.add(panel_7);
		panel_7.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
		
		JButton AddSaleButt = new JButton("Add");
		panel_7.add(AddSaleButt);
		
		JButton ResetSalebutt = new JButton("Reset");
		panel_7.add(ResetSalebutt);
		
		Panel panel_8 = new Panel();
		panel.add(panel_8, BorderLayout.CENTER);
		panel_8.setLayout(new BorderLayout(0, 0));
		
		JPanel panel_9 = new JPanel();
		panel_8.add(panel_9, BorderLayout.NORTH);
		panel_9.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
		
		JLabel lblCustomerCpr = new JLabel("Customer CPR:");
		panel_9.add(lblCustomerCpr);
		
		textField = new JTextField();
		panel_9.add(textField);
		textField.setColumns(10);
		
		JPanel panel_10 = new JPanel();
		panel_8.add(panel_10, BorderLayout.CENTER);
		panel_10.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
		
		JButton btnFinalizeSale = new JButton("Finalize Sale");
		panel_10.add(btnFinalizeSale);
		
		JButton btnCancel = new JButton("Cancel");
		panel_10.add(btnCancel);
		
		JPanel panel_11 = new JPanel();
		panel_8.add(panel_11, BorderLayout.SOUTH);
		panel_11.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
		
		Box verticalBox = Box.createVerticalBox();
		verticalBox.setBorder(new TitledBorder(new LineBorder(new Color(0, 0, 0)), "Items", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		panel_11.add(verticalBox);
		
		JTextArea textArea = new JTextArea();
		textArea.setColumns(30);
		textArea.setRows(5);
		verticalBox.add(textArea);
		
		JPanel panel_1 = new JPanel();
		tabbedPane.addTab("Rent", null, panel_1, null);
		
		JPanel panel_2 = new JPanel();
		tabbedPane.addTab("Customer", null, panel_2, null);
		
		JPanel panel_3 = new JPanel();
		tabbedPane.addTab("Item", null, panel_3, null);
	}
}
